package com.sciencep.pro.core.domain.dto.project;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.sciencep.pro.core.domain.entity.ProAssignment;
import com.sciencep.pro.core.domain.entity.ProPlanHours;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author libe
 */
@Data
@Accessors(chain = true)
public class ProAssignmentTO implements Serializable {


    @ApiModelProperty("id")
    String id;

    @ApiModelProperty("节点ID")
    String nodeId;

    @ApiModelProperty("开始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    Date nodeStart;

    @ApiModelProperty("结束日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    Date nodeEnd;

    @ApiModelProperty("用户ID")
    String userId;

    @ApiModelProperty("用户名称")
    String userName;

    @ApiModelProperty("项目角色ID")
    String proroleId;

    @ApiModelProperty("项目角色名称")
    String proroleName;

    @ApiModelProperty("投入方式")
    Integer inputType;

    @ApiModelProperty("投入开始")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    Date inputStart;

    @ApiModelProperty("投入结束")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    Date inputEnd;

    @ApiModelProperty("累计投入")
    Float inputHours;

    Integer proId;

    @ApiModelProperty("项目成员")
    private List<ProAssignment> proAssignmentList;

    @ApiModelProperty("计划投入人天")
    private List<ProPlanHours> proPlanHoursList;

    @ApiModelProperty("投入人天")
    private List<ProPlanHoursTO> planHoursList;

}
